home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / datatypes / dfadt / install-dfadt < prev    next >
Text File  |  1996-04-07  |  3KB  |  110 lines

  1. ;
  2. ; $PROJECT: dfa.datatype
  3. ;
  4. ; $VER: Install 39.1 (18.3.1995)
  5. ;
  6. ; by
  7. ;
  8. ; Dirk Federlein, Brunnengasse 11a, 63741 Aschaffenburg, Germany
  9. ;
  10. ; (C) Copyright 1995
  11. ; All Rights Reserved !
  12. ;
  13.  
  14. (set #datatype      (cat "dfa.datatype"))
  15. (set #datatype-desc (cat "DFA"))
  16.  
  17. (set mode
  18.      (askchoice
  19.          (prompt @app-name)
  20.          (help @askchoice-help)
  21.          (choices "Install" "Remove")
  22.      )
  23. )
  24.  
  25. (if mode
  26.         (set pmode "Remove")
  27.         (set pmode "Install")
  28. )
  29.  
  30. ; get classes dir
  31. (set classdir
  32.         (askdir
  33.                 (prompt "Please select the directory for classes")
  34.                 (help @askdir-help)
  35.                 (default "SYS:Classes")
  36.         )
  37. )
  38.  
  39. ; now do install or remove
  40. (if mode
  41.         ; Remove
  42.         (
  43.                 ; Show what we are doing
  44.                 (working "Removing " @app-name)
  45.  
  46.                 ; Remove the non-standard pieces
  47.                 (delete (tackon classdir "datatypes" #datatype))
  48.                 (delete (cat "devs:datatypes/" #datatype-desc) (infos))
  49.  
  50.                 ; Don't want to use the confusing "Installation Complete" message
  51.                 ; when what we really did was remove things...
  52.                 (message "The \"" @app-name "\" components "
  53.                          "that you specified have been successfully removed")
  54.                 (exit (quiet))
  55.         )
  56.  
  57.         ; Install
  58.         (
  59.                 (working "Installing " @app-name)
  60.  
  61.                 ; Install the classes
  62.                 (copylib
  63.                         (prompt (cat "Copying " @app-name))
  64.                         (help @copylib-help)
  65.                         (source (tackon "classes/datatypes" #datatype))
  66.                         (dest (tackon classdir "DataTypes"))
  67.                         (confirm)
  68.                 )
  69.  
  70.                 ; Install the descriptors
  71.                 (copyfiles
  72.                         (prompt "Copying the Descriptors")
  73.                         (help @copyfiles-help)
  74.                         (source "devs/datatypes")
  75.                         (dest "DEVS:DataTypes")
  76.                         (pattern "#?")
  77.                         (infos)
  78.                         (confirm)
  79.                 )
  80.  
  81.                 ; install include file
  82.                 (copyfiles
  83.                         (prompt "Copying source files")
  84.                         (help @copyfiles-help)
  85.                         (source "source")
  86.                         (dest "sc:examples")
  87.                         (pattern "#?")
  88.                         (confirm)
  89.                 )
  90.  
  91.                 ; install AmigaGuide file
  92.                 (copyfiles
  93.                         (prompt "Copying AmigaGuide file")
  94.                         (help @copyfiles-help)
  95.                         (source "doc")
  96.                         (dest "Guide:")
  97.                         (pattern "#?")
  98.                         (infos)
  99.                         (confirm)
  100.                 )
  101.  
  102.                 ; Tell the system about the new descriptors
  103.                 (run "C:AddDataTypes Refresh")
  104.  
  105.         )
  106. )
  107.  
  108. (set @default-dest classdir)
  109.  
  110.